<?php
	require_once "includes/class/member_management.class.php";
	
	if(!empty($_GET['viewpro'])) {
		$userId = $_GET['viewpro'];
	}
	else {
	    if($_SESSION['user_id_sess']=="") {
			echo "<script type='text/javascript'> window.location='index.php?signin&url=viewpro'; </script>";
			
		} else {
			$userId = $_SESSION['user_id_sess'];
		}	
	}
	
	//echo $userId; exit;
	$usrObj = new member_management;
	$userInfo = $usrObj->getMemberById($userId);
?>


<table width="100%" border="0">
  <tr>
    <td class="contentHeader"><h2><?php echo ucfirst($userInfo['username']); ?></h2></td>
  </tr>
  <tr>
    <td>
	  <div id="panel">
	   <table width='100%' border='0' align='center' cellspacing='0'>
			<tr>						        
				 <td width="16%" rowspan="2" style='vertical-align:top; padding:5px;'> 
				 <?php 
				  if($userInfo['profile_thumb']=="") { 
						echo "<img src='images/noPhoto.gif' border='0'>";									
				   }
				   else {
						echo "<img src='".$userInfo['profile_thumb']."' border='0'>";	
				   }
				 ?>		   
				
				 
				 </td>
				 <td width="44%" style='vertical-align:top; padding:5px;'> 
				 	
				 <?php 
						echo ucfirst($userInfo['first_name'])." ".ucfirst($userInfo['last_name'])."<br><br>"; 
						echo "Location: ".ucfirst($userInfo['city']);
					?>				 </td>
				 <td width="18%" style='vertical-align:top; padding:5px;' align="center">  <strong>Chat now</strong> <br><br>  </td>
				 <td width="22%" style='vertical-align:top; padding:5px;' align="center"> <strong>Message </strong><br> <br> </td>
			</tr>
			<tr>
			  <td height="58"><?php echo $userInfo['username']; ?></td>
			  <td colspan="2" align="center">
				<?php if($_SESSION['user_id_sess']=="") { $usr=0; } else { $usr=$_SESSION['user_id_sess'];} ?>
				<a href="javascript:void(0);" onClick="">Add to favourites</a><br><br><span id="add-wishlist"></span></td>
		    </tr>
		</table>
	  </div>
	  <br>
	   <div id="panel">
	   	<table width="100%" align="center" border="0">
			<tr>
				<td height="34"><strong>About me</strong></td>
			</tr>
			<tr>
				<td><?php echo $userInfo['about_me']; ?></td>
			</tr>
		</table>
	   </div>
	</td>
  </tr>
</table>  	
